<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // TOKEN的读写管理
    let Request={
        set token(content){
            localStorage.setItem('token',content);
        },
        get token(){
            let token=localStorage.getItem('token');
            if(!token){
                alert('请登录')
            }
            return token
        }
    }
    Request.token='3253254354tergdhdrhreher';
    console.log(Request.token);
    
</script>
</html>